package dao

import (
	"zg3yk/inits"
	"zg3yk/model"
)

func List() (result []*model.Article, err error) {
	if err = inits.DB.Order("like_count desc").Find(&result).Error; err != nil {
		return nil, err
	}
	return result, nil
}
